<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', function () {
    return view('welcome');
});

Auth::routes();

Route::group(['middleware' => 'home.checkwechatlogin','namespace' => 'Home'], function () {});

Route::group(['middleware' => 'auth.admin:admin','namespace' => 'Admin','prefix' => 'admin'], function () {

    Route::get('/', 'HomeController@index')->name('home');
    Route::get('/users', 'UserController@index')->name('users.index');

    Route::resource('configs', 'ConfigController');
    Route::resource('identifications', 'IdentificationController');
});

Route::get('/home', 'Admin\HomeController@index')->name('home');





